import 'package:flutter/material.dart';
/// 组件之间状态更新
class Counter with ChangeNotifier{

  int _count = 0;  /// 初始状态
  /// 构造函数 初始化值
  Counter(){
    this._count = 10;
  }

  int get count=>_count;  /// 获取状态
  incCount(){  /// 更新状态
    this._count++;
    notifyListeners(); /// 表示更新状态
  }

}